Skip to content

stm32cube: get rid of the HAL Legacy definitions header#321

Draft
mathieuchopstm wants to merge 1 commit intozephyrproject-rtos:mainfrom
mathieuchopstm:remove_hal_legacy_header
Draft

stm32cube: get rid of the HAL Legacy definitions header#321
mathieuchopstm wants to merge 1 commit intozephyrproject-rtos:mainfrom
mathieuchopstm:remove_hal_legacy_header

Conversation

@mathieuchopstm
Copy link
Collaborator

Remove the HAL Legacy definitions header from all series using a little trick to ensure proper compilation despite the missing file, and update the README of all series to remove mention of patches to the header we are getting rid of.

Also remove the other legacy headers (can_legacy / eth_legacy) which are never used from the Zephyr side. This is however more of a cosmectic patch as these headers are not part of the build (they are only included if the corresponding HAL module is enabled, which is not the case in Zephyr).

@mathieuchopstm mathieuchopstm force-pushed the remove_hal_legacy_header branch 2 times, most recently from a21a0d7 to f0466c7 Compare October 27, 2025 14:48
@mathieuchopstm mathieuchopstm marked this pull request as draft October 27, 2025 14:55
@mathieuchopstm mathieuchopstm force-pushed the remove_hal_legacy_header branch from f0466c7 to f4b6cc1 Compare October 27, 2025 15:29
Remove the HAL Legacy definitions header from most series using a dummy
replacement (shared by all series!) to ensure proper compilation despite
the missing file, and update the README of affected series to remove entry
documenting patches to the HAL Legacy definitions header.

While it at, get rid of all other legacy headers (can_legacy / eth_legacy)
which Zephyr never uses. This is purely cosmectic as these headers are
only used if the corresponding HAL module is enabled but Zephyr has never
enabled (and will never enable!) the CAN_LEGACY or ETH_LEGACY modules.

The STM32F7 and STM32U5 series are not modified and will continue to use
their current (patched) HAL Legacy definitions header: some drivers have
not been updated(!) and require legacy definitions to build...

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
@mathieuchopstm mathieuchopstm force-pushed the remove_hal_legacy_header branch from f4b6cc1 to 5a56062 Compare February 17, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant